home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 June / EnigmA AMIGA RUN 08 (1996)(G.R. Edizioni)(IT)[!][issue 1996-06][EARSAN CD VII].iso / earcd / gcc / ixemlsrc.lha / ixemul / ixnet / Makefile.in < prev    next >
Makefile  |  1996-03-13  |  4KB  |  173 lines

  1. #### Start of system configuration section. ####
  2.  
  3. srcdir =    @srcdir@
  4.  
  5. ifeq ($(srcdir),.)
  6. srcdir = ../..
  7. endif
  8.  
  9. VPATH :=    $(srcdir)
  10.  
  11. # Common prefix for machine-independent installed files.
  12. prefix =    @prefix@
  13.  
  14. # Common prefix for machine-dependent installed files.
  15. exec_prefix =    @exec_prefix@
  16.  
  17. bindir =    $(exec_prefix)/bin
  18. libdir =    $(exec_prefix)/Sys/libs
  19.  
  20. INSTALL =    @INSTALL@
  21. INSTALL_DATA =    @INSTALL_DATA@
  22.  
  23. CC =        @CC@
  24.  
  25. CFLAGS =    @CFLAGS@
  26. LDFLAGS =    @LDFLAGS@
  27.  
  28. RANLIB =    @RANLIB@
  29. AR =        ar
  30.  
  31. #### End system configuration section ####
  32.  
  33. ifdef CATENATE
  34. DEBUG_FLAG =    -g
  35. else
  36. DEBUG_FLAG =
  37. endif
  38.  
  39. # I *love* GNU make!
  40. define catenate
  41. /bin/echo -n creating $@...
  42. /bin/echo "$(^:%=#include \"%\"\n)" >$@
  43. /bin/echo done
  44. endef
  45.  
  46. FLAVOR_CFLAGS = -m$(CPU) -m$(FPU)
  47. OTHER_CFLAGS =    -fomit-frame-pointer
  48. ALL_CFLAGS =    $(CFLAGS) $(FLAVOR_CFLAGS) $(OTHER_CFLAGS) $(DEBUG_FLAG) $(INCS)
  49.  
  50. INCS =        -I$(srcdir) -I$(srcdir)/../library -I$(srcdir)/../include
  51. LIB =        libixnet.a
  52. SHELL =     sh
  53.  
  54. # Strip the executable (-s), don't look for standard libraries (-nostdlib)
  55. # don't link in crt0.o (-nostartfiles)
  56. # link in some libc.a files (-L../../../glue/no-baserel -lglue)
  57. # need some stuff in libgeneral.a
  58.  
  59. LINKFLAGS =    -nostdlib -nostartfiles -L../../../glue/no-baserel
  60.  
  61. .s.o:
  62.         cp $< x.c
  63.         $(CC) $(ALL_CFLAGS) -traditional -E x.c -o x.s
  64.         $(CC) $(ALL_CFLAGS) -c x.s -o $@
  65.         rm -f x.c x.s
  66.  
  67. .c.o:
  68.         $(CC) $(ALL_CFLAGS) -c $< -o $@
  69.  
  70. all: ixnet.library ixnet.debug
  71.  
  72. SRC = bigkey.c buf.c dynahash.c getcrap.c getgrent.c \
  73.       gethostid.c gethostnamadr.c getlogin.c getnetbyaddr.c \
  74.       getnetbyname.c getnetent.c getpass.c getproto.c getprotoent.c getprotoname.c \
  75.       getpwent.c getservbyname.c getservbyport.c getservent.c getttyent.c \
  76.       herror.c hfunc.c initgroups.c \
  77.       ixnet_close.c ixnet_expunge.c ixnet_init.c ixnet_open.c \
  78.       page.c \
  79.       rcmd.c res_comp.c res_debug.c res_init.c res_mkquery.c res_query.c \
  80.       res_send.c sethostent.c smallfuncs.c socket.c \
  81.       syslog.c ttyname.c ttyslot.c
  82.  
  83. OBSOLETE_SRC = big.c btree.c delete.c hsearch.c insert.c \
  84.       lrucache.c lruhash.c lrutils.c ndbm.c search.c seq.c \
  85.       split.c storage.c updutils.c utils.c
  86.  
  87. OBJ =    $(SRC:.c=.o)
  88. OBSOLETE_OBJ = $(SRC:.c=.o)
  89.  
  90. SRC_A4 =    set_errno.c siglaunch.c
  91. OBJ_A4 =    $(SRC_A4:.c=.o)
  92.  
  93. OBJ_OTHERS =    version.o
  94.  
  95. SRC_AF =    $(filter a% b% c% d% e% f%,$(SRC))
  96. SRC_GI =    $(filter g% h% i%,$(SRC))
  97. SRC_JQ =    $(filter j% k% l% m% n% o% p% q%,$(SRC))
  98. SRC_RS =    $(filter r% s%,$(SRC))
  99. SRC_TZ =    $(filter t% u% v% w% x% y% z%,$(SRC))
  100.  
  101. OBJ_N =     start.o
  102.  
  103. IXLIBS =    $(LIB)
  104.  
  105. LIBS =        -lglue -lamiga
  106.  
  107. ifdef CATENATE
  108. ALL =        a4.o af.o gi.o jq.o rs.o tz.o $(OBJ_OTHERS)
  109. else
  110. ALL =        $(OBJ) $(OBJ_A4) $(OBJ_OTHERS) #$(OBSOLETE_OBJ)
  111. endif
  112.  
  113. $(LIB) :        $(ALL)
  114.         rm -f $@
  115.         $(AR) rv $@ $(ALL)
  116.         $(RANLIB) $@
  117.  
  118. ixnet.library:    $(OBJ_N) $(IXLIBS) ../../../glue/no-baserel/libglue.a
  119.         $(CC) -s $(LINKFLAGS) $(OBJ_N) $(IXLIBS) $(LIBS) -o $@
  120.  
  121. ixnet.debug:    $(OBJ_N) $(IXLIBS)
  122.         $(CC) -g $(LINKFLAGS) $(OBJ_N) $(IXLIBS) $(LIBS) -o $@
  123.  
  124. clean:
  125.         rm -rf 680?0
  126.  
  127. clobber:    clean
  128.         rm -f Makefile
  129.  
  130. $(SRC_A4:.c=.o) a4.o:   %.o: %.c
  131.         $(CC) $(ALL_CFLAGS) -ffixed-a4 -c $< -o $@
  132.  
  133. start.o:    start.s $(srcdir)/version.h $(srcdir)/../include/sys/ixnet_syscall.def ix_internals.h
  134.  
  135. version.o:    $(srcdir)/version.c
  136.  
  137. a4.c:        $(SRC_A4)
  138.         @$(catenate)
  139.  
  140. af.c:        $(SRC_AF)
  141.         @$(catenate)
  142.  
  143. gi.c:        $(SRC_GI)
  144.         @$(catenate)
  145.  
  146. jq.c:        $(SRC_JQ)
  147.         @$(catenate)
  148.  
  149. rs.c:        $(SRC_RS)
  150.         @$(catenate)
  151.  
  152. tz.c:        $(SRC_TZ)
  153.         @$(catenate)
  154.  
  155. ix_internals.h: create_header
  156.         create_header >$@
  157.  
  158. create_header:    create_header.o
  159.  
  160. create_header.o:    create_header.c $(srcdir)/../include/user.h ixnet.h
  161.  
  162. $(OBJS):        ixnet.h ixemul.h
  163. $(OBJS_N):      ixnet.h ixemul.h
  164. $(OBJS_T):      ixnet.h ixemul.h
  165.  
  166. $(srcdir)/version.h $(srcdir)/version.c:        parse_version ../ixnet_version.in
  167.     parse_version $(srcdir)
  168.  
  169. dep: $(SRC)
  170.     $(CC) >deps -MM $(INCS) $(SRC)
  171.  
  172. #########################################################################
  173.